using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace Assets.Scripts.wuziqi.Entity
{
    [Serializable]
    public class PieceNumInfo
    {
        public int pieceNum;
        public float x;
        public float y;
        public string color;

        public PieceNumInfo()
        {
        }

        public PieceNumInfo(int pieceNum, float x, float y, string color)
        {
            this.pieceNum = pieceNum;
            this.x = x;
            this.y = y;
            this.color = color;
        }
        public PieceNumInfo(float x, float y, string color)
        {
            this.x = x;
            this.y = y;
            this.color = color;
        }

        public override bool Equals(object obj)
        {
            return obj is PieceNumInfo info &&
                   x == info.x &&
                   y == info.y &&
                   color == info.color;
        }

        public override int GetHashCode()
        {
            return HashCode.Combine(x, y, color);
        }
    }
}
